package com.dq.gamepropaganda.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

//无参构造
@NoArgsConstructor
//有参构造
@AllArgsConstructor

@Getter
@ToString
public enum ResponseEnum {
    //一定要放在前面,否则报错
    SUCCESS(0,"成功"),
    ERROR(-1,"服务器内部错误"),

    PASS_ERROR(-101,"密码错误"),




    //公共非法数据错误码
    //DATA_ERROR(-1, "非法数据！"),
    VALIDATE_ENTITY_ERROR(-2, ""),
    CPACHA_EMPTY(-3, "验证码不能为空!"),
    CPACHA_ERROR(-4, "验证码输入错误!"),
    SESSION_EXPIRED(-5, "还未登录或会话失效，请刷新页面或者重新登录！"),
    UPLOAD_PHOTO_SUFFIX_ERROR(-6, "图片格式不正确！"),
    UPLOAD_PHOTO_ERROR(-7, "图片上传错误！"),
    SYSTEM_CPACHA_EMPTY(-8, "请先点击发送邮件验证码！"),
    FOREIGN_KEY_RESTRAIN(-9, "该用户还存在外键约束，不可删除！");
//
//    //-1xx 服务器错误
//    BAD_SQL_GRAMMAR_ERROR(-101, "sql语法错误"),
//    SERVLET_ERROR(-102, "servlet请求异常"), //-2xx 参数校验
//    UPLOAD_ERROR(-103, "文件上传错误"),
//    EXPORT_DATA_ERROR(104, "数据导出失败");

    //响应状态值
    private Integer code;
    //响应的信息
    private String message;



}
